package Day001_继承_抽象类.demo05this_super.demo02_Super三种用法;

public class Zi extends Fu {
    int num1 = 20;

    public void show(){
        int num1 = 30;
        System.out.println("局部变量num1" + num1); //30
        System.out.println("本类变量num1" + this.num1); //20
        System.out.println("父类变量num1" + super.num1); //10
    }

    public void eat(){
        System.out.println("吃狮子头...");
    }

    public Zi(){
        //访问父类空参构造方法
        super();
    }

    public Zi(int num1){
        //访问父类有参构造方法
        super(num1);
    }
}
